package io.renren.modules.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.modules.erp.entity.Msg;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface MsgService extends IService<Msg> {

    Msg getMsg(long id)throws Exception ;

    List<Msg> getMsg()throws Exception ;

    List<Msg> select(String name, int currPage, int pageSize)throws Exception ;

    Long countMsg(String name)throws Exception ;

    int insertMsg(String beanJson, HttpServletRequest request)throws Exception;
    int updateMsg(String beanJson, Long id, HttpServletRequest request) throws Exception;

    int deleteMsg(Long id, HttpServletRequest request)throws Exception;

    int batchDeleteMsg(String ids, HttpServletRequest request) throws Exception;

    int checkIsNameExist(Long id, String name)throws Exception ;
    int batchDeleteMsgByIds(String ids) throws Exception;
    List<Msg> getMsgByStatus(String status)throws Exception ;

    void batchUpdateStatus(String ids, String status) throws Exception;

    Long getMsgCountByStatus(String status,Long userId)throws Exception;
}
